import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Home from '../views/Home.vue'
import FriendChat from '../views/char/FriendChat.vue'
import HrInfo from '../views/HrInfo.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login,
    hidden: true,
  },
  {
    path: '/home',
    name: '首页',
    component: Home,
    children: [
      {
        path: '/chat',
        name: '消息',
        component: FriendChat,
      },
      {
        path: '/hrinfo',
        name: '个人中心',
        component: HrInfo,
        hidden: true,
      },
    ],
  },
]

const router = new VueRouter({
  // mode:'history',
  routes,
})

export default router
